<template>
    <div id="wrap1">
        <h1>组合式API</h1>
        <p>{{ str }}</p>
        <p>{{ num }}</p>
        <p>{{ text }}</p>
        <input type="text" v-model="text">
    </div>
</template>
<script lang="ts">
import { ref } from 'vue';
export default {
    name: 'studemo2',
    setup() {
        const str: string = '你好，世界！';
        const num: number = 123;
        let text = ref<string>('');
        return {
            str,
            num,
            text,
        }
    },
}
</script>
<style lang="scss">
#wrap1 {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    text-align: center;
    margin-top: 20px;
    font-size: 18px;
    flex-direction: column;

    h1 {
        font-size: 50px;
        margin-bottom: 20px;
        color: rgb(243, 231, 233);
    }
}
</style>